﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Besture.Common;
using Besture.Dal;

namespace Besture.Bll
{
    public class CommonDac : BaseFacade
    {
        private readonly QueryDal excuteDal = new QueryDal();

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="tableName"></param>
        /// <param name="ids"></param>
        /// <returns></returns>
        public static int DeleteLists(string tableName,string ids)
        {
            CommonDac dac = new CommonDac();
            return dac.DeleteList(tableName,ids);
        }
        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="tableName"></param>
        /// <param name="ids"></param>
        /// <returns></returns>
        public int DeleteList(string tableName,string ids)
        {
            try
            {
               
                CreateConnection();
                return excuteDal.DeleteList(tableName,ids);
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                CloseConnection();
            }
        }
    }
}
